# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=haystack
pkgver=1823.c178b5a
pkgrel=3
pkgdesc='A Python framework for finding C structures from process memory - heap analysis - Memory structures forensics.'
groups=('blackarch' 'blackarch-binary' 'blackarch-forensic')
arch=('any')
url='https://github.com/trolldbois/python-haystack'
license=('GPL3')
depends=('python2' 'python2-levenshtein' 'python2-ptrace' 'python2-networkx')
makedepends=('git' 'python2-setuptools')
source=('git+https://github.com/trolldbois/python-haystack.git')
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.rst CHANGES.txt
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

